package com.ruomeng.robot.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ruomeng.robot.entity.ExplosiveGoods;
import com.ruomeng.robot.entity.Tgroup;
import com.ruomeng.robot.entity.TgroupUpdateVO;
import com.ruomeng.robot.mapper.TgroupMapper;
import com.ruomeng.robot.mapper.TgroupUpdateMapper;


@Service
@Transactional(readOnly = true)
public class GroupService {
	
	@Autowired
	private TgroupUpdateMapper tgroupUpdateMapper;
	@Autowired
	private TgroupMapper tgroupMapper;
	
	//热门采集群展示
	public int showCount(TgroupUpdateVO group)
	{
		return tgroupUpdateMapper.showCount(group);
	}
	//综合，实时上新，销量榜......
	public int showTool(TgroupUpdateVO group)
	{
		return tgroupUpdateMapper.showTool(group);
	}
	public int searchTool(TgroupUpdateVO group)
	{
		return tgroupUpdateMapper.searchListCount(group);
	}
	//热门采集群展示
	public List<TgroupUpdateVO> listShow(TgroupUpdateVO group)
	{
		return tgroupUpdateMapper.listShow(group);
	}
	//综合，实时上新......
	public List<TgroupUpdateVO> showAll(TgroupUpdateVO group)
	{
	//	return tgroupUpdateMapper.zongheList(group);
		return tgroupUpdateMapper.showAll(group);
	}
	public List<TgroupUpdateVO> searchAll(TgroupUpdateVO group)
	{
		return tgroupUpdateMapper.searchList(group);
	}
	
	//获取群列表
	public List<Tgroup> groupList(Tgroup group)
	{
		return tgroupMapper.selectByPrimaryList(group);
	}
	
	//综合，实时上新......
		public List<ExplosiveGoods> baokuanList(ExplosiveGoods eGoods)
		{
			return tgroupUpdateMapper.baokuanList(eGoods);
		}
		public Integer baokuanListCount(ExplosiveGoods eGoods)
		{
			return tgroupUpdateMapper.baokuanListCount(eGoods);
		}
		
		
		/*--------------------------以下是解耦合新添加的---------------------------------*/
		public List<TgroupUpdateVO> showGoodGoods(TgroupUpdateVO group)
		{
			return tgroupUpdateMapper.showGoodGoods(group);
		}	
		public int showGoodGoodsCount(TgroupUpdateVO group)
		{
			return tgroupUpdateMapper.showGoodGoodsCount(group);
		}
		public List<TgroupUpdateVO> zongheList(TgroupUpdateVO group)
		{
		return tgroupUpdateMapper.zongheList(group);
			
		}
		//综合，实时上新，销量榜......
		public int zongheListCount(TgroupUpdateVO group)
		{
			return tgroupUpdateMapper.zongheListCount(group);
		}
}
